Agree with @crispyoz's recommendation to clean the contacts. If it were a hardware issue or manufacturing defect, it likely wouldn't have worked at all. I also recommend checking if the contacts have been damaged during SIM card insertion and removal.